home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / man / cmds.fmt / unifdef.man < prev    next >
Encoding:
Text File  |  1991-08-24  |  3.5 KB  |  133 lines

  1.  
  2.  
  3.  
  4. UNIFDEF                   User Commands                   UNIFDEF
  5.  
  6.  
  7.  
  8. NNAAMMEE
  9.      unifdef - remove ifdef'ed lines
  10.  
  11. SSYYNNOOPPSSIISS
  12.      uunniiffddeeff [ --tt --ll --cc --DD_s_y_m --UU_s_y_m --iiDD_s_y_m --iiDD_s_y_m ] ...  [ file ]
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      _U_n_i_f_d_e_f is useful for removing ifdef'ed lines from a file
  16.      while otherwise leaving the file alone.  _U_n_i_f_d_e_f acts on
  17.      #ifdef, #ifndef, #else, and #endif lines, and it knows only
  18.      enough about C to know when one of these is inactive because
  19.      it is inside a comment, or a single or double quote.  Pars-
  20.      ing for quotes is very simplistic: when it finds an open
  21.      quote, it ignores everything (except escaped quotes) until
  22.      it finds a close quote, and it will not complain if it gets
  23.      to the end of a line and finds no backslash for continua-
  24.      tion.
  25.  
  26.      If you want to use _u_n_i_f_d_e_f for plain text (not C code), use
  27.      the --tt option, which disables this parsing for C comments
  28.      and quotes.
  29.  
  30.      You specify which symbols you want defined (--DD_s_y_m) or unde-
  31.      fined (--UU_s_y_m) and the lines inside those ifdefs will be
  32.      copied to the output or removed as appropriate.  The ifdef,
  33.      ifndef, else, and endif lines associated with _s_y_m will also
  34.      be removed.  Ifdefs involving symbols you don't specify and
  35.      ``#if'' control lines are untouched and copied out along
  36.      with their associated ifdef, else, and endif lines.  If an
  37.      ifdef X occurs nested inside another ifdef X, then the
  38.      inside ifdef is treated as if it were an unrecognized sym-
  39.      bol.  If the same symbol appears in more than one argument,
  40.      the last occurrence dominates.
  41.  
  42.      The --ll option causes _u_n_i_f_d_e_f to replace removed lines with
  43.      blank lines instead of deleting them.
  44.  
  45.      If your C code uses ifdefs to delimit non-C lines, such as
  46.      comments or code which is under construction, then you must
  47.      tell _u_n_i_f_d_e_f which symbols are used for that purpose so that
  48.      it won't try to parse for quotes and comments inside those
  49.      ifdefs.  You specify ignored ifdefs with --iiDD_s_y_m and --iiUU_s_y_m
  50.      similar to --DD_s_y_m and --UU_s_y_m above.
  51.  
  52.      _U_n_i_f_d_e_f copies its output to _s_t_d_o_u_t and will take its input
  53.      from _s_t_d_i_n if no _f_i_l_e argument is given.  If the --cc argument
  54.      is specified, then the operation of _u_n_i_f_d_e_f is complemented,
  55.      i.e. the lines that would have been removed or blanked are
  56.      retained and vice versa.
  57.  
  58.      _U_n_i_f_d_e_f works nicely with the --DD_s_y_m option added to _d_i_f_f(1)
  59.      as of the 4.1 Berkeley Software Distribution.
  60.  
  61.  
  62.  
  63. Sprite v1.0             December 14, 1988                       1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. UNIFDEF                   User Commands                   UNIFDEF
  71.  
  72.  
  73.  
  74. SSEEEE AALLSSOO
  75.      diff(1)
  76.  
  77. DDIIAAGGNNOOSSTTIICCSS
  78.      Inappropriate else or endif.
  79.      Premature EOF with line numbers of the unterminated #ifdefs.
  80.  
  81.      Exit status is 0 if output is exact copy of input, 1 if not,
  82.      2 if trouble.
  83.  
  84. AAUUTTHHOORR
  85.      Dave Yost for The Rand Corporation.
  86.      Still maintained independently by Dave Yost as of 3/85
  87.  
  88. BBUUGGSS
  89.      Should try to deal with ``#if'' lines.
  90.      Doesn't work correctly if input contains null characters.
  91.  
  92.  
  93.  
  94.  
  95.  
  96.  
  97.  
  98.  
  99.  
  100.  
  101.  
  102.  
  103.  
  104.  
  105.  
  106.  
  107.  
  108.  
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129. Sprite v1.0             December 14, 1988                       2
  130.  
  131.  
  132.  
  133.